import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;

public class CountingTest
{
	public void Count()throws IOException
	{
		int wstart=0;
		int orin=0;
		int length3=0;
		boolean go=true;
		while(go)
		{
			BufferedReader input=new BufferedReader(new InputStreamReader(System.in));
			String Line=input.readLine();
			String[] word=Line.split(" ");
			for(int i=0;i<word.length;i++)
			{
				if(word[i].equalsIgnoreCase("EXIT")) 
				{
					go=false;
					break;
				}
				if(word[i].startsWith("w")||word[i].startsWith("W"))
					wstart++;
				if(word[i].length()==3)
					length3++;
				if(word[i].contains("or"))
					orin++;
			}
		}
			MyPrint(wstart,orin,length3);		
	}	
	
	void MyPrint(int w,int or,int three)
	{
		System.out.println("The number of words start with W is " + w);
		System.out.println("The number of words include OR is " + or);
		System.out.println("3 length words' number is " + three);
	}
	
	public static void main(String[] args)throws IOException
	{
		CountingTest mycounting=new CountingTest();
		System.out.println("Please Input!");
		mycounting.Count();
	}
}